package com.yhou.sharding.service.impl;

import com.yhou.sharding.mapper.UserMapper;
import com.yhou.sharding.po.User;
import com.yhou.sharding.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author houyong
 * @ProjectName sharding_demo
 * @Description:
 * @date 2018/11/16 上午11:20
 */
@Service
public class UserServiecImpl implements IUserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User findOne(Long id) {
        return userMapper.findOne(id);
    }

    @Override
    public int save(User user) {
        return userMapper.save(user);
    }

    @Override
    public int bacthsave(List<User> list) {
        return userMapper.bacthsave(list);
    }
}
